package com.ding.easycontroller.dao.impl;

import com.ding.easycontroller.dao.DaoDao;
import com.ding.easycontroller.file.DaoFile;
import com.ding.easycontroller.work.Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 脚本持有者
 */

@Repository
public class DaoDaoImpl implements DaoDao {


    //与文件系统保持一致性

    @Autowired
    private DaoFile daoFile;

    @Override
    public List<Dao> listAll() {
        return daoFile.listAll();
    }

    @Override
    public void add(Dao dao) {
        daoFile.add(dao);
    }

    @Override
    public void removeById(String id) {
        daoFile.removeById(id);
    }

    @Override
    public void update(Dao dao) {
        daoFile.update(dao);
    }

}
